<?php
defined('JOC') or die;
/**
 * Description of seo
 *
 * @author javier.camelis
 */
class seo
{
  
  static function escape($subject = '')
  {
    
    $search  = array(' ', '--');
    
    $replace = array('-', '-');
    
    $subject = str_replace($search,$replace, $subject) ;
    
    $subject = strtolower($subject) ;

    return $subject ;
  }
  static function escape_brace($subject = '')
  {
  	$search  = array('{', '}');
    
    $replace = array('&#123;', '&#125;');
    
    $subject = str_replace($search,$replace, $subject) ;
    
    return $subject ;
  }
  static function url_frontend(){
  	return SITE_PROTOCOL.'://'.SITE_URL.(SITE_PORT != '' ? ':'.SITE_PORT : '' ).'/'.(SITE_FOLDER != '' ? SITE_FOLDER.'/' : '' ) ; 
  }
}

?>
